﻿Public Structure Tag
	Dim name As String
	Dim url As String
	Dim count As String
	Dim rank As String  'necessary if getting the top tags chart
	Dim reach As String
	Dim taggings As String
	Dim streamable As String
	Dim image() As String

	Public Sub New(ByRef xmlTag As XElement)
		parseXML(xmlTag)
	End Sub

	Public Sub parseXML(ByRef xmlTag As XElement)

		If (xmlTag.<name>.Count > 0) Then
			name = xmlTag.<name>.Value
		End If
		If (xmlTag.<count>.Count > 0) Then
			count = xmlTag.<count>.Value
		End If
		If (xmlTag.<url>.Count > 0) Then
			url = xmlTag.<url>.Value
		End If
		If (xmlTag.<reach>.Count > 0) Then
			reach = xmlTag.<reach>.Value
		End If
		If (xmlTag.<taggings>.Count > 0) Then
			taggings = xmlTag.<taggings>.Value
		End If
		If (xmlTag.<streamable>.Count > 0) Then
			streamable = xmlTag.<streamable>.Value
		End If
		If (xmlTag.Attributes("rank").Count > 0) Then
			url = xmlTag.Attribute("rank")
		End If
	End Sub
End Structure
